package com.project_doctor.controller;

import com.project_doctor.pojo.dto.HealthInfoDTO;
import com.project_doctor.service.HealthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/health")
public class HealthController {
    @Autowired
    private HealthService healthService;

    //服务详情页的健康随访修改
    @PutMapping("/updateHealth")
    public ResponseEntity<?> updateHealth(@RequestBody HealthInfoDTO dto) {
        healthService.updateHealth(dto);
        return ResponseEntity.ok("修改成功");
    }
}
